package com.cpecc.manager.wuzi;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cpecc.dao.wuzi.CaiGouSPRDao;
import com.cpecc.model.system.User;
import com.cpecc.model.wuzi.CaiGouSPR;

@Service
@Transactional
public class CaiGouSPRManager {

	@Autowired
	private CaiGouSPRDao caiGouSPRDao;
	
	public void save(CaiGouSPR caiGouSPR){
		caiGouSPRDao.save(caiGouSPR);
	}
	
	public CaiGouSPR get(String id){
		return caiGouSPRDao.get(id);
	}
	
	public boolean delete(String id){
		return caiGouSPRDao.delete(id);
	}
	
	public boolean deleteAllSPR(String shenQingId){
		return caiGouSPRDao.deleteAllSPR(shenQingId);
	}
	
	public List<User> getAllShenPiR(String shenQingId){
		return caiGouSPRDao.getAllShenPiR(shenQingId);
	}
	
	public List<CaiGouSPR> list(String shenQingId){
		return caiGouSPRDao.list(shenQingId);
	}
	
	public List<CaiGouSPR> getMySPList(User user){
		return caiGouSPRDao.getMySPList(user);
	}
}
